import json

from flask import Blueprint, request
from utils.Response import Response

friendList_bp = Blueprint('friendList_bp', import_name=__name__, url_prefix='/friendList')


@friendList_bp.get("")
def get_friendList():
    with open("data/user_list.txt", 'r', encoding='utf-8') as file:
        conversations = file.read()  # 读取整个文件内容为一个长字符串
    return Response.success(data=json.loads("["+conversations+"]"))